<!-- BEGIN PAGE HEADER-->
<?php $this->load->view('partials/breadcrumb.tpl')?>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
	<div class="col-xs-12 ">

		<!-- BEGIN SAMPLE FORM PORTLET-->
		<div class="portlet box green ">
			<?=edit_form_caption(l($thisMethod).'车辆')?>
			<div class="portlet-body form">
				<?=form_open('', Array('class'=>'form-horizontal', 'role'=>'form', 'id'=>'form_edit', 'data-category-id'=>$obj->id))?>
					<div class="form-body">
						<?=edit_form_input('name', set_value('name', $obj->name), '车辆名称')?>
						<?=edit_form_input('brand', set_value('brand', $obj->brand), '车辆品牌')?>
                        <?=edit_form_uploader('picture', set_uploader('picture', $obj->picture), '车辆图片')?>
                        <?=edit_form_input('price', set_value('price', $obj->price?$obj->price:(IOSS_StaticConfig::$norMalPrice)), '价格（元）/天','',1)?>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">车辆小程序码</label>
                            <div class="col-xs-7 down-code">
                                <?php if ($obj->qr_code): ?>
                                <div id="picture" class="ajax-uploader __inited">
                                    <div class="ajax-uploader-image" >
                                        <input type="hidden" name="qr_code" value="<?= $obj->qr_code ?>">
                                        <img class="img-rounded zoomify" src="<?= image_url($obj->qr_code) ?>" style="max-width:120px;max-height:90px; margin:5px 15px 5px 0; ">
                                        <a href="<?= image_url($obj->qr_code) ?>" download class="btn btn-info"><i class="fa fa-download"></i>
                                            <span> 下载 </span>
                                        </a>
                                    </div>
                                </div>
                                <?php else: ?>
                                    <input type="text" readonly value="添加成功后，小程序码将自动生成" class="form-control">
                                <?php endif; ?>
                            </div>
                        </div>
                        <?=edit_form_radio_list('status', MCar::getState(), set_value('status', ($thisMethod == 'edit'?$obj->status:'0')), '状态')?>
					</div>
					<?php $this->load->view('partials/submitButtons.tpl')?>
				<?=form_close()?>
			</div>
		</div>
		<!-- END SAMPLE FORM PORTLET-->
		<!-- BEGIN SAMPLE FORM PORTLET-->
	</div>
</div>
<link href="<?=image_url('/static/assets/global/plugins/jstree/dist/themes/default/style.min.css')?>" rel="stylesheet" type="text/css"/>

<script type="text/javascript">
    $(document).ready(function(){
        AjaxUploader.uploadTempUrl = "<?=site_url('/common/AjaxUpload/upload') . '/'  ?>";
        AjaxUploader.init();
        $(document).ready(function () {
            $('.img-rounded').zoomify();
        });
    });
</script>
